package org.mybatis.generator.plugins;

import org.mybatis.generator.api.IntrospectedTable;
import org.mybatis.generator.api.PluginAdapter;
import org.mybatis.generator.api.dom.xml.XmlElement;

import java.util.List;

/**
 * @description: 对生成的XML进行操作
 * @author: 01369542
 * @create: 2018/07/19
 **/
public class MyXMLPlugin extends PluginAdapter {
    /*
     * @Description: 继承PluginAdapter必选
     * @Author: 01369542
     * @Date: 2018/7/19
     */
    @Override
    public boolean validate(List<String> list) {
        return true;
    }

    /*
     * @Description: 不在xml中生成SelectAll方法
     * @Author: 01369542
     * @Date: 2018/7/18
     */
    @Override
    public boolean sqlMapSelectAllElementGenerated(XmlElement element,
                                                   IntrospectedTable introspectedTable) {
        return false;
    }

    /*
     * @Description: 不在xml中生成Insert方法
     * @Author: 01369542
     * @Date: 2018/7/18
     */
    @Override
    public boolean sqlMapInsertElementGenerated(XmlElement element,
                                                IntrospectedTable introspectedTable) {
        return false;
    }

    /*
     * @Description: 不在xml中生成ResultMap方法
     * @Author: 01369542
     * @Date: 2018/7/18
     */
    @Override
    public boolean sqlMapResultMapWithoutBLOBsElementGenerated(
            XmlElement element, IntrospectedTable introspectedTable) {
        return false;
    }

}
